package com.beordie.service.impl;

import com.beordie.dao.IPunishmentDao;
import com.beordie.dao.impl.PunishmentDaoImpl;
import com.beordie.model.Punishment;
import com.beordie.service.IPunishmentService;

import java.util.List;

/**
 * @Classname PunishmentServiceImpl
 * @Description TODO
 * @Date 2021/7/14 8:06
 * @Created 30500
 */
public class PunishmentServiceImpl implements IPunishmentService {
    IPunishmentDao punishmentDao = new PunishmentDaoImpl();

    @Override
    public List<Punishment> getAll() {
        return punishmentDao.getAll();
    }

    @Override
    public List<Punishment> getAllByLimit(boolean isLimit, int start, int size) {
        return punishmentDao.getAllByLimit(isLimit, start, size);
    }

    @Override
    public List<Punishment> getAllByNotice(int id) {
        return punishmentDao.getAllByNotice(id);
    }

    @Override
    public int insert(Punishment punishment) {
        return punishmentDao.insert(punishment);
    }

    @Override
    public int deleteById(int id) {
        return punishmentDao.deleteById(id);
    }

    @Override
    public int updateById(Punishment punishment, int id) {
        return punishmentDao.updateById(punishment, id);
    }

    @Override
    public Punishment findByNumName(String condition) {
        return punishmentDao.findByNumName(condition);
    }

    @Override
    public int getCount() {
        return punishmentDao.getCount();
    }
}
